#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "BehavioredClassifier.h"
#include "Classifier.h"
#include "StructuredClassifier.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class ConnectableElement;

/// <summary>
/// Collaboration
/// A Collaboration describes a structure of collaborating elements (roles), each
/// performing a specialized function, which collectively accomplish some desired
/// functionality. 
/// </summary>
class UMLMODEL_EXPORT Collaboration : public Classifier, public BehavioredClassifier, public StructuredClassifier {

public: // Constructors and destructors
    explicit Collaboration(const QString& umlType="uml::Collaboration");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// collaborationRoles getter
    /// Represents the participants in the Collaboration.
    /// </summary>
    vector<shared_ptr<ConnectableElement>>& collaborationRoles();

private: // Fields
    /// <summary>
    /// collaborationRoles
    /// Represents the participants in the Collaboration.
    /// </summary>
    vector<shared_ptr<ConnectableElement>> collaborationRoles_;

};

} // namespace uml
